package com.hls.util;

import com.hls.domain.Result;
import com.sun.org.apache.regexp.internal.RE;

/**
 * Created by huangliusong on 2017/7/22.
 */
public class ResultUtil {
    public static Result success(Object object){
        Result result=new Result();
        result.setCode(0);
        result.setData(object);
        result.setMsg("成功");
        return result;
    }
    public  static Result success(){
        return success(null);
    }
    public static Result error(Integer code,String msg){
        Result result=new Result();
        result.setMsg(msg);
        result.setCode(code);
        result.setData("null");
        return result;
    }
}
